<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>内容列表 - FinalCMS Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<link rel="stylesheet" href="${ctx}/css/bootstrap.min.css" />
<link rel="stylesheet" href="${ctx}/css/font-awesome.min.css" />
<link rel="stylesheet" href="${ctx}/css/jquery-ui.custom.min.css" />
<link rel="stylesheet" href="${ctx}/css/jquery.gritter.css" />
<!--[if lte IE 9]>
<link rel="stylesheet" href="${ctx}/css/fc-part2.min.css" />
<![endif]-->
<link rel="stylesheet" href="${ctx}/css/fc-skins.min.css" />
<link rel="stylesheet" href="${ctx}/css/fc-rtl.min.css" />
<link rel="stylesheet" href="${ctx}/css/fc-fonts.css" />
<link rel="stylesheet" href="${ctx}/css/fc.min.css" />
<link rel="stylesheet" href="${ctx}/css/fc-custom.css" />
<!--[if lte IE 9]>
 <link rel="stylesheet" href="${ctx}/css/fc-ie.min.css" />
<![endif]-->

<!--[if lte IE 8]>
<script src="${ctx}/js/html5shiv.js"></script>
<script src="${ctx}/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
	var globalURL = "${url}";
</script>
<script type="text/javascript" src='${ctx}/js/jquery1.11.0.min.js'></script>


<style type="text/css">
.dataTables_wrapper .row{
	clear: both; 
}
</style>
</head>

<body class="no-skin">
<?include("../../inc/menu.html",{current:"post_article"}){}?>
<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<ul class="breadcrumb">
			<li><i class="ace-icon fa fa-home home-icon"></i> <a
				href="${ctx}/admin/index">首页</a></li>
			<li class="active">查看文章</li>
		</ul>
		<div class="nav-search" id="nav-search">
			<form class="form-search">
				<span class="input-icon"> <input type="text"
					placeholder="Search ..." class="nav-search-input"
					id="nav-search-input" autocomplete="off" /> <i
					class="ace-icon fa fa-search nav-search-icon"></i>
				</span>
			</form>
		</div>
	</div>

	<div class="page-content">
		<?include("../../inc/function.html"){}?>
		<div class="page-header">
			<h1>查看文章 ${session.test}</h1>
		</div>
		<div class="row">
			<form action="${ctx}/admin/post/list" id="frm" method="post">
				<div class="alert alert-success" style="padding: 5px; margin-bottom: 0px;">
					<span> <label>分类</label> 
						<select name="ftype">
							<?for(f in ftype) {?><option value="${f.name}" ${f.name == s_ftype! ? "selected=true" : ""} >${f.desc}</option><?}?>
						</select>
					</span> 
					<span>
						<label>文章状态</label>
						<select name="fstatus">
							<?for(f in pstatus) {?><option value="${f.name}" ${f.name == s_status! ? "selected=true" : ""}  >${f.desc}</option><?}?>
						</select>
					</span>
					<span> <label>关键词</label> <input type="text" name="keyword" value="${keyword!}" />
					</span> <span> <input type="submit" value="搜索" class="search" />
					</span>
				</div>
				<? if(exist("page") && page != null){ ?>	
				<div class="table-container col-xs-12 table_page">
					<table id="content-table"
						class="table table-striped table-bordered table-hover table_page">
						<thead>
							<tr>
								<th class="center sorting_disabled" role="columnheader" rowspan="1" colspan="1" aria-label="">选择</th>
								<th class="center">编号</th>
								<th class="center">标题</th>
								<th class="center">分类</th>
								<th class="center">所属栏目</th>
								<th class="center">状态</th>
								<th class="center">发布时间</th>
								<th class="center">操作</th>
							</tr>
						</thead>
						<tbody>
							<#fc:foreach data="${page.list!}" ; list,index>
								<tr>
									<td class="center">
									<label class="position-relative">
										<input type="checkbox" class="ace table_check" name="contentId" value="${list.id!}">
										<span class="lbl"></span>
									</label></td>
									<td class="center">${list.id!}</td>
									<td class="center">${list.title!}</td>
									<td class="center">${@org.yi.fc.enums.PostTypeEnum.parseEnum(list.ftype).getDesc()}</td>
									<td class="center">${@org.yi.fc.entity.FCategory.dao.findById(list.category).get('name')}</td>
									<td class="center">${@org.yi.fc.enums.PostStatusEnum.parseEnum(list.status).getDesc()}</td>
									<td class="center">${list.create_time}</td>
									<td class="center"> 
										<div class="hidden-sm hidden-xs action-buttons">
											<!-- 查看文章 -->
											<a href="${ctx}/admin/post/reViewContent/?cid=${list.id!}" target="_blank" class="blue view-content" >
												 <i class="ace-icon fa fa-search-plus bigger-130" title="查看"></i>
											</a> 
											<!-- 编辑文章  -->
											<a href="javascript:void(0)"  class="green edit-content" artile-data="${list.id!}">
												 <i class="ace-icon fa fa-pencil bigger-130" title="编辑"></i>
											</a> 
											<!-- 禁用 -->
											
											<a href="javascript:void(0)"   class="dark forbid-content forbid" artile-data="${list.id!}"> 
												<i class="ace-icon fa fa-ban bigger-130" title="禁用"></i>
											</a>
											<!-- 删除 -->
											<a href="javascript:void(0)"  class="red del-content delete" artile-data="${list.id!}"> 
												<i class="ace-icon fa fa-trash-o bigger-130" title="删除"></i>
											</a>
										</div>
									</td>
								</tr>
							</#fc:foreach>
						</tbody>
					</table>
					<#fc:pagination page="${page!}" opgroup="true" formId="frm" delfun="delContents" forbidfun="forbidContents" repubfun="repubContents" />
				</div>
			<? } ?>		
			</form>
		</div>
	</div>
</div>

<?include("../../inc/footer.html"){}?>
<script type="text/javascript" src="${ctx}/js/bootstrap.min.js"></script>
<!--[if lte IE 8]>
<script type="text/javascript" src="${ctx}/js/excanvas.min.js"></script>
<![endif]-->
<!-- 消息提示框插件 -->
<script type="text/javascript" src="${ctx}/js/jquery.gritter.min.js"></script>
<script type="text/javascript" src="${ctx}/js/fc-extra.min.js"></script>
<script type="text/javascript" src="${ctx}/js/fc.min.js"></script>
<script type="text/javascript" src="${ctx}/js/admin/util.js"></script>
<script type="text/javascript" src="${ctx}/js/admin/fc.post.js"></script>
<script type="text/javascript">
	if('${msg!}' != ''){
		$.gritter.add({
			title:  '提示' ,
			sticky: false, //提示框是否不消失
			text: '${msg!}',
			class_name: 'gritter-center gritter-success'
		});
    }
</script>
</body>
</html>
